﻿Public Class TypologieNiv1CRUD
    Dim db As New Connexion
    Dim action As String
    Dim Entrer As String
    Dim TextBoxID As String

    'Public Function(Table As String)
    '    db.myReq = "SELECT syscolumns.name AS colonne FROM sysobjects , syscolumns WHERE  ( sysobjects.id = syscolumns.id) And  (sysobjects.xtype = 'U') and sysobjects.name= '" & Table & "'"
    '    Public Insert As String = "INSERT INTO  [ "  & databaseName & "].[dbo].[ActvCateg]([Cod_EquipCateg2], [Nom_ActvCateg],[Exp_ActvCateg])VALUES('" & Me.TextBoxCodeTypol.Text & "','" & Me.TextBoxNomTypol.Text & "','" & Me.TextBoxDef.Text & "')"
    'End Function

    'Public Sub miseajour(ByVal Table As String)
    '    db.myReq = "SELECT * FROM  [ "  & databaseName & "].[dbo].[ActvCateg]"
    '    db.Connecter(databaseName)
    '    DataGridViewTypol.Rows.Clear()
    '    While db.rdr.Read()
    '        DataGridViewTypol.Rows.Add(db.rdr(0), db.rdr(1), db.rdr(2), db.rdr(3))
    '    End While
    '    db.Disconnecter()

    '    If DataGridViewTypol.RowCount - 1 = 0 Then
    '        Me.TextBoxCodeTypol.Text = ""
    '        Me.TextBoxNomTypol.Text = ""
    '        Me.TextBoxDef.Text = ""
    '    Else
    '        DataGridViewTypol.Rows(0).Selected = True
    '        Me.TextBoxCodeTypol.Text = DataGridViewTypol.SelectedCells(1).Value
    '        Me.TextBoxNomTypol.Text = DataGridViewTypol.SelectedCells(2).Value
    '        Me.TextBoxDef.Text = DataGridViewTypol.SelectedCells(3).Value
    '        TextBoxID = DataGridViewTypol.SelectedCells(0).Value
    '    End If
    'End Sub


End Class
